import axios from 'axios'
import qs from "qs";

// 获取所有报价
export async function getPurchaseList(){
    var resp = await axios.get('/api/quotation/show');
    return resp.data;
}
//查询采购方案
export async function queryPurchaseList(queryCondition){
    var resp = await axios.get('/api/quotation/query', {
        params: {
            commodityName:queryCondition.commodityName,
            deadTime:queryCondition.deadTime,
        }
    });
    return resp.data;
}

//发布采购订单
export async function sendQuotation(quotation){

    var resp = await axios.get('/api/quotation/send',{
        params:{
            supplierCode: quotation.supplierCode,
            purchasingPlanSeq: quotation.purchasingPlanSeq,
            quotationPrice: quotation.quotationPrice,
            purchasingNum: quotation.purchasingNum,

        }
    });
    return resp.data;
}

//采购完成通知后端
export async function noticePlatform(total,purchasingPlanSeq){
    var resp = await axios.get('/api/quotation/notice',{
        params:{
            purchasingNum: total,
            purchasingPlanSeq,
           
        }
    });
    return resp.data;
}
